﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Lamex.mTools.UI
{
    public partial class frmTL_PdfToExcel : DevExpress.XtraEditors.XtraForm
    {
        public frmTL_PdfToExcel()
        {
            InitializeComponent();
        }

        //C# PDF操作之-PDF转EXCEL
        //https://blog.csdn.net/baidu_27474941/article/details/103927781

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();     //显示选择文件对话框 
            openFileDialog1.Filter = "All files (*.*)|*.*|pdf files (*.pdf)|*.pdf";
            openFileDialog1.FilterIndex = 2;
            openFileDialog1.RestoreDirectory = true;
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                //int index = openFileDialog1.FileName.LastIndexOf('\\');
                //PdfHelper.dataDir = openFileDialog1.FileName.Substring(0, index) + "\\";//显示文件路径
                //PdfHelper.dataName = openFileDialog1.FileName.Substring(index + 1, openFileDialog1.FileName.Length - index - 1);
                //PdfHelper.Runxls();
                //MessageBox.Show("结束");
            }
        }
    }
}